home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Sunday Times: The Month 2003 December
/
The Sunday Times - The Month 2003-12.iso
/
mac
/
The Month DEC 03
/
engine
/
modules
/
thumbs_tall.swf
/
scripts
/
frame_1
/
DoAction.as
Wrap
Text File
|
2003-11-10
|
3KB
|
117 lines
function loadImage(mc, node, extrapath)
{
extrapath != null ? 0 : (extrapath = "");
var strDefaultPath = Tardis.ASSETS_FOLDER + "images/" + Tardis.ActiveSection.id + "/";
var strImg = node.firstChild.nodeValue;
var diffpath = node.attributes.path;
if(diffpath != null)
{
strImg = diffpath + strImg;
}
else
{
strImg = strDefaultPath + extrapath + strImg;
}
strPathPrefix != null ? 0 : (strPathPrefix = "");
mc.loadMovie(strPathPrefix + strImg);
}
function addLink(mc)
{
Links[mc.link] = mc;
}
function getMCfromLink(Item)
{
if(Links[Item] == null)
{
var arr = [];
while(Item != sideMenu.ItemHome)
{
arr.unshift(Item._name.split("_").pop());
Item = Item._parent._parent;
}
var str = arr.join("/");
Links[Item] = Links[str];
}
return Links[Item];
}
function removeLinkListener()
{
Tardis.sideMenu.EB.removeListener(this);
}
function txtOver(mc)
{
mc.gotoAndStop("over");
if(blnHasPreview)
{
_parent.preview.doOver(mc.num);
}
Tardis.sideMenu.doOver(mc.link);
}
function txtOut(mc)
{
mc.gotoAndStop("off");
if(blnHasPreview)
{
_parent.preview.doOut(mc.num);
}
Tardis.sideMenu.doOut(mc.link);
}
function txtUp(mc)
{
Tardis.sideMenu.doUp(mc.link);
}
function init()
{
var mcToDisplay = "clip" + nodeData.childNodes.length + "MC";
attachMovie(mcToDisplay,"mc_module",100);
trace("");
trace("attaching clip: " + mcToDisplay);
trace("");
mc_module._x = 5;
mc_module._y = 10;
var strID = Tardis.ActiveSection.id;
var Colors = Tardis.Colors;
var strColor = Colors.getString(strID);
SECTION_COLOR = Colors.getHex(strID);
DEFAULT_COLOR = Colors.getHex("default");
THUMB_PATH = nodeData.attributes.thumbpath;
play();
onComplete();
}
function doOver(Item)
{
var mc = getMCfromLink(Item);
mc.gotoAndStop("over");
_parent.preview.doOver(mc.num);
}
function doOut(Item)
{
var mc = getMCfromLink(Item);
mc.gotoAndStop("off");
_parent.preview.doOut(mc.num);
}
function positionElements(mc)
{
if(nodeData.childNodes.length >= 10)
{
mc.titleFF._y = mc.imgToCheck._height - 2;
}
else
{
mc.titleFF._y = mc.imgToCheck._height;
}
mc.activeBtn._height = 96;
mc._visible = true;
}
Links = {};
Tardis.sideMenu.EB.addListener(this);
blnHasPreview = 1;
stop();
onReady();
this.onUnload = function()
{
removeLinkListener();
clearInterval(intervalID);
this.onUnload = null;
};